

#ifndef UC_GECONE_H
#define UC_GECONE_H

#include "zgegbl.h"
#include "zgeintrvl.h"
#include "zgevec3d.h"
#include "zgesurf.h"
#include "zgearc3d.h"
#pragma pack (push, 8)

class UcGePoint3d;
class UcGeVector3d;
class UcGeCircArc3d;
class UcGeInterval;
class UcGeLinearEnt3d;

class 
GX_DLLEXPIMPORT
UcGeCone : public UcGeSurface
{
public:
    UcGeCone();
    UcGeCone(double cosineAngle, double sineAngle,
             const  UcGePoint3d& baseOrigin, double baseRadius,
             const  UcGeVector3d& axisOfSymmetry);
    UcGeCone(double cosineAngle, double sineAngle,
             const  UcGePoint3d& baseOrigin, double baseRadius,
             const  UcGeVector3d& axisOfSymmetry,
             const  UcGeVector3d& refAxis, const  UcGeInterval& height,
             double startAngle, double endAngle);
    UcGeCone(const UcGeCone& cone);

    double           baseRadius        () const;
    UcGePoint3d      baseCenter        () const;
    void             getAngles         (double& start, double& end) const;
    double           halfAngle         () const;
    void             getHalfAngle      (double& cosineAngle, double& sineAngle)
                                                 const;
    void             getHeight         (UcGeInterval& range) const;
    double           heightAt          (double u) const;
    UcGeVector3d     axisOfSymmetry    () const;
    UcGeVector3d     refAxis           () const;
    UcGePoint3d      apex              () const;
    ZSoft::Boolean   isClosed          (const UcGeTol& tol = UcGeContext::gTol) const;
    ZSoft::Boolean   isOuterNormal     () const;

    UcGeCone&        setBaseRadius     (double radius);
    UcGeCone&        setAngles         (double startAngle, double endAngle);
    UcGeCone&        setHeight         (const UcGeInterval& height);
    UcGeCone&        set               (double cosineAngle, double sineAngle,
                                        const  UcGePoint3d& baseCenter,
                                        double baseRadius,
                                        const  UcGeVector3d& axisOfSymmetry);
    UcGeCone&        set               (double cosineAngle, double sineAngle,
                                        const  UcGePoint3d& baseCenter,
                                        double baseRadius,
                                        const  UcGeVector3d& axisOfSymmetry,
                                        const  UcGeVector3d& refAxis,
                                        const  UcGeInterval& height,
                                        double startAngle, double endAngle);

    UcGeCone&        operator =        (const UcGeCone& cone);

    ZSoft::Boolean   intersectWith     (const UcGeLinearEnt3d& linEnt, int& intn,
                                        UcGePoint3d& p1, UcGePoint3d& p2,
                                        const UcGeTol& tol = UcGeContext::gTol) const;
};

#pragma pack (pop)
#endif
